package cool.houge.pig.repository.auth;

import cool.houge.pig.model.AuthClient;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import reactor.core.publisher.Mono;

/**
 * 认证客户端数据仓库.
 *
 * @author KK (kzou227@qq.com)
 */
public interface AuthClientRepository extends ReactiveCrudRepository<AuthClient, Integer> {

  /**
   * @param clientId
   * @return
   */
  @Query("SELECT * FROM t_auth_client WHERE client_id=:clientId")
  Mono<AuthClient> findByClientId(String clientId);
}
